# ------------TCP套叠字--------------------
import socket,time
ip_port=('localhost',1234)
bank_log=5
buffer_size=1024
tcp_clent = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
tcp_clent.connect(ip_port)
while True:
    msg = input("请输入字符串：>>>").strip()
    if not msg:continue
    tcp_clent.sendall(msg.encode("utf-8"))
    time.sleep(2)
    data = tcp_clent.recv(buffer_size)
    print("server send message is :",data.decode("utf8"))
sk.close()
